#include "fxcc/core/platform/sdl2/Callbacks.h"

std::unordered_map<int, KeyCode> CallBacks::m_KeyMap =
{
    { SDL_SCANCODE_A, KeyCode::A },
    { SDL_SCANCODE_B, KeyCode::B },
    { SDL_SCANCODE_C, KeyCode::C },
    { SDL_SCANCODE_D, KeyCode::D },
    { SDL_SCANCODE_E, KeyCode::E },
    { SDL_SCANCODE_F, KeyCode::F },
    { SDL_SCANCODE_G, KeyCode::G },
    { SDL_SCANCODE_H, KeyCode::H },
    { SDL_SCANCODE_I, KeyCode::I },
    { SDL_SCANCODE_J, KeyCode::J },
    { SDL_SCANCODE_K, KeyCode::K },
    { SDL_SCANCODE_L, KeyCode::L },
    { SDL_SCANCODE_M, KeyCode::M },
    { SDL_SCANCODE_N, KeyCode::N },
    { SDL_SCANCODE_O, KeyCode::O },
    { SDL_SCANCODE_P, KeyCode::P },
    { SDL_SCANCODE_Q, KeyCode::Q },
    { SDL_SCANCODE_R, KeyCode::R },
    { SDL_SCANCODE_S, KeyCode::S },
    { SDL_SCANCODE_T, KeyCode::T },
    { SDL_SCANCODE_U, KeyCode::U },
    { SDL_SCANCODE_V, KeyCode::V },
    { SDL_SCANCODE_W, KeyCode::W },
    { SDL_SCANCODE_X, KeyCode::X },
    { SDL_SCANCODE_Y, KeyCode::Y },
    { SDL_SCANCODE_Z, KeyCode::Z },
    { SDL_SCANCODE_0, KeyCode::NUM0 },
    { SDL_SCANCODE_1, KeyCode::NUM1 },
    { SDL_SCANCODE_2, KeyCode::NUM2 },
    { SDL_SCANCODE_3, KeyCode::NUM3 },
    { SDL_SCANCODE_4, KeyCode::NUM4 },
    { SDL_SCANCODE_5, KeyCode::NUM5 },
    { SDL_SCANCODE_6, KeyCode::NUM6 },
    { SDL_SCANCODE_7, KeyCode::NUM7 },
    { SDL_SCANCODE_8, KeyCode::NUM8 },
    { SDL_SCANCODE_9, KeyCode::NUM9 },
    { SDL_SCANCODE_ESCAPE, KeyCode::ESC },
    { SDL_SCANCODE_RETURN, KeyCode::ENTER },
    { SDL_SCANCODE_SPACE, KeyCode::SPACE },
    { SDL_SCANCODE_BACKSPACE, KeyCode::BACKSPACE },
    { SDL_SCANCODE_LEFT, KeyCode::LEFT },
    { SDL_SCANCODE_RIGHT, KeyCode::RIGHT },
    { SDL_SCANCODE_UP, KeyCode::UP },
    { SDL_SCANCODE_DOWN, KeyCode::DOWN },
    { SDL_SCANCODE_LALT, KeyCode::LEFTALT },
    { SDL_SCANCODE_LSHIFT, KeyCode::LEFTSHIFT },
    { SDL_SCANCODE_LCTRL, KeyCode::LEFTCTRL },
    { SDL_SCANCODE_RALT, KeyCode::RIGHTALT },
    { SDL_SCANCODE_RSHIFT, KeyCode::RIGHTSHIFT },
    { SDL_SCANCODE_RCTRL, KeyCode::RIGHTCTRL },
};

std::unordered_map<int, MouseButton> CallBacks::m_MouseMap =
{
    { SDL_BUTTON_LEFT, MouseButton::LEFT },
    { SDL_BUTTON_RIGHT, MouseButton::RIGHT },
    { SDL_BUTTON_MIDDLE, MouseButton::MIDDLE },
    { SDL_BUTTON_X1, MouseButton::BUTTON1 },
    { SDL_BUTTON_X2, MouseButton::BUTTON2 },
};

std::unordered_map<int, JoystickButton> CallBacks::m_JoystickMap =
{
    { 0, JoystickButton::A },
    { 1, JoystickButton::B },
    { 2, JoystickButton::X },
    { 3, JoystickButton::Y },
    { 4, JoystickButton::LB },
    { 5, JoystickButton::RB },
    { 6, JoystickButton::BACK },
    { 7, JoystickButton::START },
    { 8, JoystickButton::LSTICK },
    { 9, JoystickButton::RSTICK },
    { 10, JoystickButton::CENTER}
};